package com.anjbo.service.loan.impl;

import com.anjbo.bean.loan.LoanScheme;
import com.anjbo.bean.loan.RedMortgageDto;
import com.anjbo.dao.app.loan.RedMortgageMapper;
import com.anjbo.dao.mort.order.RedOrderMapper;
import com.anjbo.service.loan.RedMortgageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2017/6/8.
 */
@Service("redMortgageService")
public class RedMortgageServiceImpl implements RedMortgageService {



    @Autowired
    private RedMortgageMapper redMortgageMapper;

    @Autowired
    private RedOrderMapper redOrderMapper;

    @Override
    public List<LoanScheme> selectSchemeByQualification(String qualification) {
        return redMortgageMapper.selectSchemeByQualification(qualification);
    }

    @Override
    public List<RedMortgageDto> getHistoryListByUid(RedMortgageDto mortgageDto) {
        return redMortgageMapper.getHistoryListByUid(mortgageDto);
    }

    @Override
    public RedMortgageDto getRedMortgageDtoByOrderId(String id) {
        return redMortgageMapper.getRedMortgageDtoByOrderId(id);
    }

    @Override
    public int insertRedMortgageDto(RedMortgageDto mortgageDto) {
        return redMortgageMapper.insertRedMortgageDto(mortgageDto);
    }

    @Override
    public List<LoanScheme> selectSchemeByType(String schemeType) {
        return redMortgageMapper.selectSchemeByType(schemeType);
    }

    @Override
    public Integer assessTimesToday(String uid) {
        return redMortgageMapper.assessTimesToday(uid);
    }

	@Override
	public Integer updateRedMortgageDtoByOrderId(RedMortgageDto mortgageDto) {
		return redMortgageMapper.updateRedMortgageDtoByOrderId(mortgageDto);
	}
	
	@Override
	public Map<String, Object> getRedMortgageDetailByOrderNo(Map<String, Object> param){
		return redMortgageMapper.getRedMortgageDetailByOrderNo(param);
	}
	
	@Override
	public  List<Map<String, Object>> selectRedOrderProgressList(){
		return redMortgageMapper.selectRedOrderProgressList();
	}

    @Override
    public String selectUserNameByUid(String uid) {
        return redOrderMapper.selectUserNameByUid(uid);
    }

    @Override
    public RedMortgageDto selectProgressInfoByOrderNo(String orderNo) {
        return redMortgageMapper.selectProgressInfoByOrderNo(orderNo);
    }

    @Override
    public int insertOrderThird(RedMortgageDto mortgageDto) {
        return redOrderMapper.insertOrderThird(mortgageDto);
    }

    @Override
    public void initProgressItem(String orderNo,String code) {
        redOrderMapper.initProgressItem(orderNo,code);
    }

    @Override
    public void cleanCard(String orderNo) {
        redMortgageMapper.cleanCard(orderNo);
    }

    @Override
    public void cleanCredit(String orderNo) {
        redMortgageMapper.cleanCredit(orderNo);
    }

    @Override
    public void cleanHouseCert(String orderNo) {
        redMortgageMapper.cleanHouseCert(orderNo);
    }

    @Override
    public RedMortgageDto selectByOrderNo(String orderNo) {
        return redMortgageMapper.selectByOrderNo(orderNo);
    }
}
